import request from '@/utils/request';

/**
 * @description 查询列表
 */
export const remoteList = params => {
    return request.get('/sys/solution/query', params);
};

/**
 * 添加 更新
 */
export const addAndUpdateInfo = data => {
    return request.post('/sys/solution/newAndUpd', data);
};

/**
 * 删除
 */
export const deleteInfo = data => {
    return request.post(`/sys/solution/logicDelete`, data);
};

/**
 * 详情接口
 */
export const getInfo = id => {
    return request.get(`/sys/solution/queryDetail?solutionId=${id}`);
};

/**
 * 方案中 试题列表
 * solutionId=6711696239756037&qstName=题目1
 */
export const getSolutionQuestionList = data => {
    return request.post('/sys/solution/queryQst', data);
};

/**
 *方案里的试题删除接口 /sys/solution/deleteQst
 {"ids":[6711732138279685,6711732303823621],  选择删除的试题id，多个用逗号分隔
 "solutionId": 6711696239756037              方案id
 }
 */
export const deletQst = data => {
    return request.post('/sys/solution/deleteQst', data);
};

/**
 * 随机抽取试题
 */
export const randomQuestion = params => {
    return request.get(`/sys/sysQuestion/extractQuestion`, params);
};

/**
 * 方案创建完成接口
 */
export const solutionDone = id => {
    return request.get(`/sys/solution/complete?solutionId=${id}`);
};

/**
 * 回收站界面查询接口
 */
export const remoteRecycleList = params => {
    return request.get(`/sys/solution/queryForRecycle`, params);
};

/**
 * 方案回收界面的还原按钮接口
 */
export const remoteRecovery = data => {
    return request.post(`/sys/solution/recovery`, data);
};

/**
 * 方案回收界面的彻底删除按钮接口
 */
export const deepDelete = data => {
    return request.post(`/sys/solution/delete`, data);
};

export default {
    remoteList
};
